/**
 * 
 */
package com.itinsys.enma.manager;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.itinsys.enma.domain.Period;
import com.itinsys.enma.domain.response.PeriodResponse;
import com.itinsys.enma.exception.period.PeriodExistsException;

/**
 * @author pferraz
 *
 */
public interface PeriodManager {

	Period getPeriodByStartDateAndEndDate(Date startDate,Date endDate);

	Boolean addPeriod(Period p);

	Boolean updatePeriod(Period p);

	PeriodResponse getNotSpecialPeriods();

	PeriodResponse deletePeriod(long id) throws PeriodExistsException;

	Period dtoToPeriod(Map<String, String> periodDTO);

	Period getPeriodByDatePlannIdAndSubject(java.sql.Date startDate,java.sql.Date endDate, int pId, String description) throws PeriodExistsException;

	List<Map<String, String>> listPeriodToListPeriodDTO(Set<Period> periods);

	List<Period> getPeriodsToEnd(String string);

	void directUpdate(Period period);

	PeriodResponse getAllLocks();

	PeriodResponse lockControl();
	

}
